// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

@import '~@mozilla-protocol/core/protocol/css/includes/lib';

// * -------------------------------------------------------------------------- */
// Navigation styles

.c-navigation {
    background: $color-white;
    box-shadow: none;
    color: $color-black;
    margin-bottom: $layout-sm;

    .c-navigation-container {
        @include clearfix;
        margin: 0 auto;
        max-width: $content-max;
        position: relative;
    }

    .c-navigation-logo a {
        @include image-replaced;
        background: url('/media/img/logos/m24/lockup-black-on-white.png') no-repeat;
        display: block;
        height: 48px;
        width: 160px;

        .c-navigation-logo-image {
            display: none;
        }
    }

    // Shoulder button
    .c-navigation-shoulder {
        display: inline-block;
        *display: inline;
        margin: 0;
        position: absolute;
        @include bidi(((right, 0, left, auto),));
        text-align: center;
        top: $spacing-md;
        top: 0\0;

        .mzp-c-button-download-container {
            display: inline-block;
            *display: inline;
            margin-bottom: 0;

            // hide privacy link
            .mzp-c-button-download-privacy-link {
                display: none;
            }
        }

        // hide FxA button
        .c-navigation-vpn-cta-container {
            display: none;
        }
    }

    // Nav button
    .c-navigation-menu-button {
        display: none;
    }

    .c-navigation-items {
        @include clearfix;
        clear: both;
        margin-top: $layout-xs;
    }

    .c-menu-category {
        display: inline-block;
        *display: inline;
        zoom: 1;
    }

    // only display primary navigation links to IE visitors
    .c-menu-panel {
        display: none;
    }

    .c-menu-title {
        @include bidi(((margin-right, $spacing-md, margin-left, 0),));
        display: inline-block;
        *display: inline;
        font-weight: bold;
        zoom: 1;
    }

    .c-navigation-menu {
        ul {
            list-style-type: none;
            margin: 0 0 $spacing-lg;
            padding: 0;

            li {
                margin: 0;
                padding: 0;
            }
        }
    }
}

.c-sub-navigation {
    .c-sub-navigation-icon {
        display: none;

        // only show in IE9 which supports SVG
        :root & {
            display: inline-block;
            float: none;
        }
    }
}

// fallback navigation between `firefox.all.*` download steps
.c-product-info {
    .c-steps img.c-step-icon {
        display: none;

        // only show in IE9 which supports SVG
        :root & {
            display: inline;
        }
    }

    .c-steps a.c-step-icon {
        img {
            display: none;
        }

        &:after { /* stylelint-disable-line selector-pseudo-element-colon-notation */
            content: ' (×)';
        }

        // revert for IE9 which supports SVG
        :root & {
            img {
                display: inline;
            }

            &:after { /* stylelint-disable-line selector-pseudo-element-colon-notation */
                content: '';
            }
        }
    }
}

// * -------------------------------------------------------------------------- */
// Redesigned header

.m24-c-navigation-logo-link {
    @include image-replaced;
    background: url('/media/img/logos/m24/lockup-black-on-white.png') no-repeat;
    display: block;
    height: 48px;
    width: 160px;

    .m24-c-navigation-logo-image {
        display: none;
    }
}

// only show top-level menu items
.m24-c-menu {
    .m24-c-menu-panel {
        display: none;
    }

    .m24-c-menu-title,
    ul,
    li {
        @include bidi(((margin-right, $spacing-md, margin-left, 0),));
        display: inline-block;
        *display: inline;
        font-weight: bold;
        margin-top: $spacing-sm;
        zoom: 1;
    }

    .m24-c-menu-title-icon {
        display: none;

        // only show in IE9 which supports SVG
        :root & {
            display: inline-block;
        }
    }
}

// hide SVG or JS-dependent interaction from IE visitors
.m24-c-navigation-menu-button,
.m24-c-flag,
.moz24-footer-logo-image-bottom {
    display: none;
}

.m24-pencil-banner {
    @include bidi(((float, right, left),));

    button {
        display: none;
    }
}
